package com.wenson.behavior.command;

/**
 * @ClassName: FlashClient
 * @Author: luowangcheng
 * @Date: 2024/6/16 12:53
 * @Description:
 */
public class FlashClient {
    public static void main(String[] args) throws InterruptedException {
        BulbSwitcher switcher = new BulbSwitcher();//命令请求方
        Bulb bulb = new Bulb();//命令执行方
        Command flashCommand = new FlashCommand(bulb);//闪烁命令

        switcher.setCommand(flashCommand);
        switcher.buttonPush();
        Thread.sleep(3000);//此处观看一会闪烁效果再结束任务
        switcher.buttonPop();
    }
}
